<?php
$uid = Yii::app()->user->id;
$storedList = Yii::app()->user->getState($uid);
if($storedList != null)
{
for ($i = 0; $i < count($storedList); $i++)
{

    if($storedList[$i] == $id)
    {
        unset($storedList[$i]);
    }
}
}
Yii::app()->user->setState($uid, $storedList);

    $this->renderPartial('DisplayCart');
?>
